package com.zz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Select;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 已参加的活动
 *
 * @author zhouzi
 */
@Data
@ApiModel("已参加的活动")
public class Attended implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空",groups = {Select.class})
    @TableId(type= IdType.AUTO)//主键自增
    private Integer id;

    //用户账号
    @ApiModelProperty("用户账号")
    @NotNull(message = "用户学号不能为空")
    @Range(min=1000000000, message = "用户学号长度为10位")
    private Integer userId;

    //活动编码
    @ApiModelProperty("活动编码")
    @NotNull(message = "活动编码不能为空")
    private Integer activityId;

    //是否参加调查问卷
    @ApiModelProperty("是否参加调查问卷")
    @NotNull(message = "是否参加调查问卷的项不能为空")
    private Integer ifInvestigated;
}
